<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:jsf="http://xmlns.jcp.org/jsf"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <h:head>
        <style>
            .ui-widget, .ui-widget .ui-widget {
                font-size: 85%;
            }
        </style>
        <title>Sociedad</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="Shortcut Icon" 
              href="#{request.contextPath}/resources/images/world.png" type="image/x-icon" />
        <link href="#{request.contextPath}/resources/thim/css/bootstrap.css" rel="stylesheet" media="screen" />
        <link href="#{request.contextPath}/resources/thim/css/thin-admin.css" rel="stylesheet" media="screen" />
        <link href="#{request.contextPath}/resources/thim/css/font-awesome.css" rel="stylesheet" media="screen" />
        <link href="#{request.contextPath}/resources/thim/style/style.css" rel="stylesheet" />
        <link href="#{request.contextPath}/resources/thim/style/dashboard.css" rel="stylesheet" media="screen" />
        <link href="#{request.contextPath}/resources/thim/style/nestable.css" rel="stylesheet" media="screen" />
        <!--
        <f:facet name="first">
            <script src="#{request.contextPath}/resources/js/utilitary.min.js"></script>
        </f:facet>
        <script>
            //removejscssfile('primefaces.css', 'css');
            //removejscssfile('theme.css', 'css');
        </script>
        -->
    </h:head>
    <h:body>
        <p:growl autoUpdate="true" />
        <!-- CABEZERA -->
        <div class="container">
            <form jsf:id="formLogId">
                <div class="top-navbar header b-b"> <a data-original-title="Toggle navigation" class="toggle-side-nav pull-left" href="#"><i class="icon-reorder"></i> </a>
                    <div class="brand pull-left"> <a href="index_sociedad.jsf"><img src="#{request.contextPath}/resources/images/logo_cjava_1.png" width="250" height="60" /></a></div>
                    <ul class="nav navbar-nav navbar-right  hidden-xs">

                        <li class="dropdown"> <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="icon-envelope"></i> <span class="badge">1</span> </a>
                            <ul class="dropdown-menu extended notification">
                                <li class="title">
                                    <p>CJava te da la bienvenida</p>
                                </li>
                                <li> 
                                    <a jsf:id="sdfsdf" onclick="changePass.show();"> 
                                        <span class="photo"> 
                                            <img src="#{request.contextPath}/resources/thim/images/user_admin.png" width="34" height="34" />
                                        </span> 
                                        <span class="subject"> <span class="from">#{clientBean.businessAssociateLoged.idPerson.name}</span> 
                                            <span class="time">Ahora</span> 
                                        </span> 
                                        <span class="text"> Cambia tu contraseña </span> 
                                    </a> 
                                </li>
                            </ul>
                        </li>

                        <li class="dropdown user  hidden-xs"> <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="icon-male"></i> <span class="username">#{clientBean.businessAssociateLoged.idPerson.name}</span> <i class="icon-caret-down small"></i> </a>
                            <ul class="dropdown-menu">

                                <li>
                                    <p:commandLink value="Mi Perfil" update=":contentGlobaPageId" >
                                        <f:setPropertyActionListener
                                            target="#{navigatorClientBean.navigationIndexContent}"
                                            value="./pages/client/loged/perfil.xhtml" />
                                    </p:commandLink>
                                </li>
                                <li class="divider"></li>
                                <li><a href="#" jsf:id="logId" jsf:action="#{clientBean.logOutAssociate()}"><i class="icon-key"></i> Salir</a></li>

                            </ul>
                        </li>

                    </ul>
                </div>
            </form>
        </div>

        <!-- MENU PRINCIPAL -->

        <div class="wrapper">

            <div class="left-nav">
                <form jsf:id="formAss">
                    <div id="side-nav">
                        <ul id="nav">
                            <li> 
                                <p:commandLink id="aaasssId" update=":contentGlobaPageId"> 
                                    <i class="icon-dashboard"></i> Inicio 
                                    <f:setPropertyActionListener
                                        target="#{navigatorClientBean.navigationIndexContent}"
                                        value="./pages/client/loged/home.xhtml" />

                                </p:commandLink>
                            </li>
                            <li> 
                                <a href="#"> 
                                    <i class="icon-desktop"></i> Eventos
                                    <span class="label label-info pull-right">2</span> 
                                    <i class="arrow icon-angle-left"></i>
                                </a>
                                <ul class="sub-menu">
                                    <li>
                                        <p:commandLink id="as" update=":contentGlobaPageId"
                                                       action="#{clientBean.initMeetingValues()}"> 
                                            <i class="icon-edit"></i> Eventos CJava
                                            <f:setPropertyActionListener
                                                target="#{navigatorClientBean.navigationIndexContent}"
                                                value="./pages/client/loged/event.xhtml" />

                                        </p:commandLink>
                                    </li>
                                    <li>
                                        <p:commandLink id="ass" action="#{clientBean.initMeetingValues()}"
                                                       update=":contentGlobaPageId"> 
                                            <i class="icon-edit"></i> Eventos Inscritos
                                            <f:setPropertyActionListener
                                                target="#{navigatorClientBean.navigationIndexContent}"
                                                value="./pages/client/loged/event_register.xhtml" />
                                        </p:commandLink>
                                    </li>
                                </ul>
                            </li>

                            <li> 
                                <a href="#"> 
                                    <i class="icon-desktop"></i> Bolsa de Trabajo
                                    <span class="label label-info pull-right">2</span> 
                                    <i class="arrow icon-angle-left"></i>
                                </a>
                                <ul class="sub-menu">
                                    <li>
                                        <p:commandLink id="dssId" update=":contentGlobaPageId"
                                                       action="#{clientBean.initProfileForPerson()}"> 
                                            <i class="icon-table"></i> Construye tu CV
                                            <f:setPropertyActionListener
                                                target="#{navigatorClientBean.navigationIndexContent}"
                                                value="./pages/client/loged/bolsa_trabajo.xhtml" />

                                        </p:commandLink>
                                    </li>
                                    <li>
                                        <p:commandLink id="dssasdffId" update=":contentGlobaPageId"> 
                                            <i class="icon-table"></i> Sube tu CV
                                            <f:setPropertyActionListener
                                                target="#{navigatorClientBean.navigationIndexContent}"
                                                value="./pages/client/loged/upload_cv.xhtml" />

                                        </p:commandLink>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <!-- CONTENIDO WEB -->

            <div class="page-content">
                <p:outputPanel id="contentGlobaPageId" style="width: 100%;height: 100%;">
                    <ui:include src="#{navigatorClientBean.navigationIndexContent}" />
                </p:outputPanel> 
            </div>

        </div>

        <div class="bottom-nav footer">CJava Perú &copy;, siempre para apoyarte... </div>
        
        <p:dialog appendTo="@(body)" modal="true" widgetVar="changePass"
                  id="changePassId" header="Cambiar Contraseña">
            <h:form id="user-forms" class="form-horizontal label-left" >
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="passAnt">Antiguo Password</label>
                        <div class="controls form-group">
                            <p:password id="passAnt" required="true" requiredMessage="Antiguo Pass"
                                        size="35" placeholder="Antiguo Pass" value="#{clientBean.oldPass}"
                                        styleClass="col-sm-6 col-xs-12"  />
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="passAnt">Nuevo Password</label>
                        <div class="controls form-group">
                            <p:password id="p4assAnt" required="true" requiredMessage="Nuevo Pass"
                                        placeholder="Nuevo Password" size="35"
                                        styleClass="col-sm-6 col-xs-12" value="#{clientBean.newPass}" />
                        </div>
                    </div>
                    <br/>
                    <div class="control-group">
                        <label class="control-label" for="passAnt">Repita Nuevo Password</label>
                        <div class="controls form-group">
                            <p:password required="true" requiredMessage="Repita Nuevo Pass"
                                        placeholder="Repita Password" size="35"
                                        styleClass="col-sm-6 col-xs-12" value="#{clientBean.repetNewPass}" />
                        </div>
                    </div>
                    <br/>
                </fieldset>
                <div class="form-actions">
                    <p:commandButton value="Guardar Info" oncomplete="changePass.hide();"
                                     action="#{clientBean.changePassword()}"/>
                    <p:commandButton value="Cancelar" onclick="changePass.hide();"/>
                </div>
            </h:form>
        </p:dialog>
        <!-- se activa si existe evento ajax -->
        <ui:insert name="status">
            <p:ajaxStatus
                style="width:64px;height:64px;position:fixed;right:5px;bottom:5px">
                <f:facet name="start">
                    <p:graphicImage value="/resources/images/loading.gif" />
                </f:facet>

                <f:facet name="complete">
                    <h:outputText value="" />
                </f:facet>
            </p:ajaxStatus>
        </ui:insert>
        <script src="#{request.contextPath}/resources/thim/js/bootstrap.min.js"></script> 
        <script type="text/javascript" src="#{request.contextPath}/resources/thim/js/smooth-sliding-menu.js"></script>
    </h:body>
</html>

